
import request from '@/utils/request'
// 查询商品表列表
export function listtable(query) {
  return request({
    url: 'table/list',
    method: 'get',
    params: query
  })
}
// 查询商品表详细
export function gettable(id) {
  return request({
    url: '/table/' + id,
    method: 'get'
  })
}

// 新增商品表
export function addtable(data) {
  return request({
    url: 'table/create',
    method: 'post',
    data: data
  })
}

// 修改商品表
export function updatetable(data) {
  return request({
    url: 'table',
    method: 'put',
    data: data
  })
}

// 删除商品表
export function deltable(id) {
  return request({
    url: 'table/' + id,
    method: 'delete'
  })
}

//点单
export function addOrder(data) {
  return request({
    url: 'table/addOrder',
    method: 'post',
    data: data
  })
}
export function orderOver(query) {
  return request({
    url: 'table/orderChange',
    method: 'post',
    data: query
  })
}
export function createCenter(data) {
  return request({
    url: 'sku-center/create',
    method: 'post',
    data: data
  })
}
export function getList(query) {
  return request({
    url: 'sku-center/getList',
    method: 'get',
    params: query
  })
}

export function deleteItem(id) {
  return request({
    url: 'sku-center/' + id,
    method: 'delete',
  })
}